package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 巡检表
 *
 * @author code-generate
 * @date 2022-02-18
 */
@Data
@DbTable(tableName = "t_check")
public class Check extends BaseEntity {
        /**
     * 编码
     */
    @DbTableField(columnName = "c_code", dbType = DbTypeEnum.VARCHAR)
    public String code ;

    /**
     * 上报人ID
     */
    @DbTableField(columnName = "c_user_id", dbType = DbTypeEnum.INTEGER)
    public Integer userId ;

    /**
     * 上报人
     */
    @DbTableField(columnName = "c_user_name", dbType = DbTypeEnum.VARCHAR)
    public String userName ;

    /**
     * 上报时间
     */
    @DbTableField(columnName = "c_date", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime date ;

    /**
     * 扣分
     */
    @DbTableField(columnName = "c_score", dbType = DbTypeEnum.DOUBLE)
    public Double score ;

    /**
     * 检查结果(1 正常 2 违规）
     */
    @DbTableField(columnName = "c_result", dbType = DbTypeEnum.INTEGER)
    public Integer result ;

    /**
     * 违规信息
     */
    @DbTableField(columnName = "c_content", dbType = DbTypeEnum.VARCHAR)
    public String content ;

    /**
     * 结果描述
     */
    @DbTableField(columnName = "c_remark", dbType = DbTypeEnum.VARCHAR)
    public String remark ;

    /**
     * 上报类型(1 公园事件上报，2 巡查任务，3 养护任务，4清扫保洁任务 5 公厕保洁任务 6绿化管养任务，园林巡检上报）
     */
    @DbTableField(columnName = "c_type", dbType = DbTypeEnum.INTEGER)
    public Integer type ;

    /**
     * 
     */
    @DbTableField(columnName = "c_section_id", dbType = DbTypeEnum.VARCHAR)
    public String sectionId ;

    /**
     * 
     */
    @DbTableField(columnName = "c_section_name", dbType = DbTypeEnum.VARCHAR)
    public String sectionName ;

    /**
     * 
     */
    @DbTableField(columnName = "c_company_name", dbType = DbTypeEnum.VARCHAR)
    public String companyName ;

    @DbTableField(columnName = "c_approval", dbType = DbTypeEnum.INTEGER)
    public Boolean approval = false;


}
